<?php
namespace Apps\Model;
use Phalcon\Mvc\Model;

class Pay extends Model{
         public $id;
         public $user_id;
         public $bank;
         public $money;
         public $serial_num;
         public $date;
         public $state;
         public $message;
         public $trade_num;
	
public  function columnMap(){
	return array
	(
       'id'=>'id',
       'user_id'=>'user_id',
       'bank'=>'bank',
       'money'=>'money',
       'serial_num'=>'serial_num',
       'date'=>'date',
       'state'=>'state',
       'message'=>'message',
       'trade_num'=>'trade_num',
       );
	}

public function initialize(){
		$this ->setSource('dg_user_pay');
		$this ->belongsTo('user_id','Apps\Model\User','id');
	}

	public function getUser($parameters=null){
		return $this ->getRelated('Apps\Model\User',$parameters);
	}

}

